﻿
<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="Phim.aspx.cs" Inherits="Phim" Title="Phim List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Danh sách phim</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="PhimDataSource"
				DataKeyNames="PhimId"
				AllowMultiColumnSorting="False"
				DefaultSortColumnName="[TenPhim]" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_Phim.xls" AllowExportToExcel="True" AllowSorting="True" EnableModelValidation="True" ExportToExcelText="Excel" PageSelectorPageSizeInterval="10" RecordsCount="0" ShowGridOnEmptyData="False"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" CancelText="Bỏ qua" EditText="Chỉnh sửa" SelectText="Chọn" UpdateText="Cập nhật" />				
				<asp:BoundField DataField="TenPhim" HeaderText="Tên Phim" SortExpression="[TenPhim]"  />
				<asp:BoundField DataField="LichChieuBatDau" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Ngày Bắt Đầu Chiếu" SortExpression="[LichChieuBatDau]"  />
				<asp:BoundField DataField="MoTa" HeaderText="Mô Tả" SortExpression="[MoTa]"  />
				<asp:CheckBoxField DataField="TrangThai" HeaderText="Trạng Thái" SortExpression="[TrangThai]" />
				<asp:BoundField DataField="LichChieuKetThuc" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Ngày Kết Thúc" SortExpression="[LichChieuKetThuc]"  />
			</Columns>
			<EmptyDataTemplate>
				<b>No Phim Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnPhim" OnClientClick="javascript:location.href='PhimEdit.aspx'; return false;" Text="Thêm mới"></asp:Button>
		<data:PhimDataSource ID="PhimDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
		>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:PhimDataSource>
	    		
</asp:Content>



